<template>
  <div class="background">
    <div class="education">
      <div class="qualification">
        <span>学历:</span>
        <span>{{background.qualification}}</span>
      </div>
      <div class="school">
        <span>学校:</span>
        <span>{{background.school}}</span>
      </div>
      <div class="major">
        <span>专业:</span>
        <span>{{background.major}}</span>
      </div>
    </div>
    <div class="job" v-for="item in background.workInfo" v-if=" !(item.workYear === '无' || '')">
      <div class="experience">
        <span>经验:</span>
        <span>{{item.workYear}}</span>
      </div>
      <div class="previous_firm">
        <span>曾任职公司:</span>
        <span>{{item.previousFirm}}</span>
      </div>
      <div class="previous_post">
        <span>曾任职岗位:</span>
        <span>{{item.previousPost}}</span>
      </div>
    </div>
    <div class="other">
      <span>其他:</span>
      <span>{{background.other}}</span>
    </div>
  </div>
</template>

<script>
  export default {
    name: "Background",
    props: {
      background: {
        type: Object,
        default() {
          return {}
        }
      }
    }
  }
</script>

<style scoped>
  .background {
    padding: 0 20px;
    font-size: 15px;
  }

  .background > div {
    margin-top: 18px;
  }

  .education,
  .job {
    overflow: hidden;
  }

  .education > div,
  .job > div {
    float: left;
    margin-right: 40px;
  }

  .education > div span:nth-child(1),
  .job > div span:nth-child(1),
  .other span:nth-child(1) {
    margin-right: 10px;
  }

</style>
